﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxEditors;
using SGT_ON;

public partial class Maestro : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {

            if (Request.IsAuthenticated && !string.IsNullOrEmpty(Request.QueryString["ReturnUrl"]))
                Response.Redirect("~/AccesoNoAutorizado.aspx");
        } 
    }


    protected void hlAlertas_Load(object sender, EventArgs e)
    {
        ASPxHyperLink _hyper = sender as ASPxHyperLink;
        if (SGT_ON.Alerta.HayAlertasActivas == true)
        {
            _hyper.Visible = true;
            _hyper.ToolTip = "Hay " + SGT_ON.Alerta.CantidadDeAlertasActivas.ToString() + " alertas activas. Haga clic en el ícono para verlas";
        }
        else
            _hyper.Visible = false;
    }
}
